import Mock from '../../mockjs/dist/mock-min.js';

let product = [{
		key: "/product/info",
		method: "get",
		param: {
			id: 1,
		},
		data: Mock.mock({
			'STATUS': "SUCCESS",
			'DATA': {
				'product': {
					'id': '@increment(1)',
					'name': '八角亭 【5饼*提】2021年诚系列冰岛古树普洱生茶叶礼盒黎明茶厂',
					'des': 
						'<h5 style="text-indent: 2em;"></h5><h5 style="text-indent: 2em;"><span style="font-size: 12px;">【品 &nbsp; &nbsp;牌】：燕语</span></h5><h5 style="text-indent: 2em;"><span style="font-size: 12px;">【品 &nbsp; &nbsp;名】：冰岛</span></h5><h5 style="text-indent: 2em;"><span style="font-size: 12px;">【类 &nbsp; &nbsp;型】：普洱生茶</span></h5><h5 style="text-indent: 2em;"><span style="font-size: 12px;">【原 &nbsp; &nbsp;料】：云南大叶种晒青毛茶</span></h5><h5 style="text-indent: 2em;"><span style="font-size: 12px;">【产 &nbsp; &nbsp;地】：云南·临沧</span></h5><h5 style="text-indent: 2em;"><span style="font-size: 12px;">【净含量】：饼茶357克/片、349克/片</span></h5><h5 style="text-indent: 2em;"><span style="font-size: 12px;">【贮 &nbsp; &nbsp;存】：通风、干燥、无异味的环境中</span></h5><h5 style="text-align: center;"><span style="font-size: 12px;"><strong>气贵如虹，心香冰甜，有清欢。 柔和清雅，高香气，后韵清凉通透</strong></span></h5><p style="text-align: justify;"><img src="http://www.yanyucha.com/vancheerfile/Images/2022/3/20220322154634192.jpg" alt="" data-href="" style="width: 100%;"></p>'+
						"<img style='width: 100%;' src='http://www.yanyucha.com/vancheerfile/Images/2022/3/20220322154651674.jpg' />" +
						"<img style='width: 100%;' src='http://www.yanyucha.com/vancheerfile/Images/2022/3/20220322154634192.jpg' />",
						
					'category': '[{"id":"1","name":"普洱茶"},{"id":"2","name":"生茶"},{"id":"3","name":"冰岛古树"}]',
					'price|2-6': /[1-9]/,
					'cover': "https://bpic.588ku.com//back_origin_min_pic/22/10/31/1ff681fd89fe7f75d7b2a4e7e16f4c57.jpg",
					'statu|1-2': 0,
				},
				'stock|2-6': /[1-9]/,
				'imgs': [{
						'id': '@increment(1)',
						'url': "http://www.yanyucha.com/vancheerfile/images/2022/3/20220322153558658.jpg",
					},
					{
						'id': '@increment(1)',
						'url': "http://www.yanyucha.com/vancheerfile/images/2022/3/20220322153558657.jpg",
					},
					{
						'id': '@increment(1)',
						'url': "http://www.yanyucha.com/vancheerfile/images/2022/3/20220322153558713.jpg",
					},
					{
						'id': '@increment(1)',
						'url': "http://www.yanyucha.com/vancheerfile/images/2022/3/20220322153559478.jpg",
					},


				]
			}
		})
	},
	{
		key: "/product/page",
		method: "get",
		param: {
			current: 1,
			size: 10,
			name: "",
			category: "",
			statu: 1,
		},
		data: () => {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': {
					'current': 0,
					'size': 10,
					'pages': 6,
					'total': 55,
					"records|20": [{
						'id': '@increment(1)',
						'name': '@cparagraph()',
						'cover': 'https://bpic.588ku.com//back_origin_min_pic/22/10/31/e823671941ffa9551488625e8be1205c.jpg',
						'price|2-6': /[0-9]/,
						'stock|2-6': /[1-9]/,
					}],
				}
			});
		}
	},
	{
		key: "/product/info",
		method: "delete",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
	{
		key: "/product/info",
		method: "put",
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
	{
		key: "/product/info",
		method: "post",
		param: {
			product: {
				name: "",
				des: "",
				category: "",
				price: 0,
				cover: "",
				statu: 0,
			},
			stock: 0,
			imgs: [{
					url: "",
				},
				{
					url: "",
				},
			],
		},
		data: function() {
			return Mock.mock({
				'STATUS': "SUCCESS",
				'DATA': "",
			});
		}
	},
];

export default product;
